1. Field of the Invention
The present invention generally relates to an information or data processing method and system for handling multi-bit character codes inclusive of Kanji (Chinese character) code and other codes. In particular, the invention concerns an information processing method which is advantageously suited for applications where a plurality of different code systems are admixedly employed.
2. Description of the Prior Art
In the information or data processing by using electronic computers, code systems for representing characters are prescribed. For representing alphanumeric characters, Kana (the Japanese alphabets) and symbols, an 8-bit code system is to be used, while a 16-bit code system is used for characters including Kanji or Chinese characters. The 8-bit code system includes JIS (Japanese Industrial Standard) 8-bit code, ASCII code, EBCDIC code, EBCDIK code and others. On the other hand, the 16-bit code system includes JIS Kanji code, KEIS Kanji code, shift JIS code and others. Particularly in the case of the information processing where Japanese language is dealt with, use of Kanji is indispensable, which does not necessarily means that the 8-bit codes for alphanumeric characters can be omitted in the process, because some process may require use of conventional data given in the form of the 8-bit codes. Under the circumstance, there exists need for use of one 8-bit code system and one 16-bit code system in an admixed manner. As a method of making it possible to use both of these codes admixedly, it is known to insert a shift code between an 8-bit code and a 16-bit code so that the code type can be identified by the presence of the shift code. However, the information processing adopting the above method suffers a serious drawback in that every shift code has to be checked for processing the admixed type data, rendering thus very complicate the design of program. To dispose of this problem, there have been proposed methods or means mentioned below.
In the case of the shift JIS code, an 8-bit code which is not generally used as a character code of the 8-bit code system is employed as the eight most significant bits (MSB) of the 16-bit Kanji code. In that case, it is possible to readily discriminate whether a given 8 MSB bits represent the MSB bits of the 16-bit code or a code of the 8-bit code system, whereby use of the shift code is rendered unnecessary, while the ratio of the amount of displayed contents to the amound of the amount of coded data is advantageously always constant. However, it still involves a problem that discrimination between the 8-bit code and the 16-bit code is required.
As another method, it is known to add to the code of the 8-bit code system an 8-bit pattern which differs from any code of the 8-bit code system, to thereby handle all the codes as 16-bit codes which may be referred to as "coordinated 16-bit codes". According to this known method, all character data can be handled commonly as the 16-bit codes, whereby the processing is facilitated while assuring proportionality between the number of characters and the amount of data.
It should be mentioned here that alphanumeric characters can be represented by both the 8-bit code and the 16-bit code. In that case, an alphanumeric there is generally no specific relationship or similarity between the 8-bit code and the 16-bit code representing the same alphanumeric character. However, it is sometimes desired to use both 8-bit and 16-bit codes having the same coding for representing the same character, but displayed or printed in different forms. In that case, a code system disclosed in Japanese Patent Application No. 135819/1983 may be used.
By the way, in the hitherton known compiler, character-type data representing characters are each of eight bits. When the 16-bit code are handled, two data areas are allocated to the 16-bit code. In other words, data of the 16-bit code is treated as two pieces of character-type data in the compiler. Recognition of the two pieces of character-type data as a code of the 16-bit code system must exclusively rely on the preparation or design of program, thus giving rise to an obstacle to development of program and maintenance.
In the foregoing, only the problem encountered when a mixture of 8-bit code system and 16-bit code system is handled has been elucidated. However, there arise other problems when it is required to handle input/output units or CPU in which other than standard code systems are used, as will as those files in which data are stored according to such non-standard code system according to a program using the standard code system. For handling the data of the non-standard code system, the contents of data which are stored, for example, in a file may be read out after conversion or transformation by using a program prepared for code transformation. However, when the data are to be directly transferred with the input/output units or other CPU where the nonstandard code is employed, the data has to be once stored in a file for code transformation, which means the necessity of additional procedure for code transformation resulting in time consumable work.
Further, when there exist an executable program made by a non-standard compiler and/or an executable program for processing non-standard codes fetched from other system by way of a communication controller or a secondary memory, in addition to an executable program made by a standard compiler using a standard code, it is necessary to transform reversely the data of the standard code system to those of the non-standard code system or modify the executable program for the non-standard code system.
In general, in a conversational type information processing system using an electronic computer, management and control of the input terminal device (e.g. key board), output terminal device (e.g. display), secondary memory and the communication controller (generally called hereinafter as input/output terminal devices), as well as the processing for loading into a main memory the executable program stored in the secondary memory or inputted through the communication controller and the control of execution of the executable program stored in the main memory are all realized by the operating system (hereinafter also referred to as OS). In that case, the executable program requests the processing and control thereof to the OS through macro instructions. In most cases, difference in the content of the request is discriminated based on the type of macro instructions while the object of the request is represented by parameters of the macro instructions. In this manner, the common processings required for management of resources for the whole system are performed by the OS.
In the hitherto known OS, when receiving from or supplying to input/output devices codes belonging to the 8-bit code system, those codes are transformed to the code system used in input/output devices or to a specific code system specified by user. However, the aforementioned problems remain to be solved.